package com.insnow.knowshare.repository;

import com.insnow.knowshare.entity.User;
import com.insnow.knowshare.entity.UserActivityDTO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface UserRepository extends JpaRepository<User, Long> {
    // 可根据需要添加自定义方法

    @Query("SELECT u.id, u.username FROM User u")
    List<Object[]> findAllUserIdAndUsername();
}
